package base.util;

import base.standard.constant.ErrorCode;
import base.standard.exception.SimpleException;

/**
 * Assert utils
 *
 * @description: 判断工具类
 * @author: cyj
 * @date 2020 -10-29 17:17:04
 */
public class AssertUtils {

    /**
     * Check *
     *
     * @param result    result
     * @param errorCode error code
     */
    public static void check(boolean result, ErrorCode errorCode) {
        if (result) {
            throw new SimpleException(errorCode);
        }
    }
}
